# import pymysql
# db2 = pymysql.connect(host="127.0.0.1", port=3306, user="root", passwd="12345678", db="flask07", charset="utf8",
#                       autocommit=True)
# cursor = db2.cursor(cursor=pymysql.cursors.DictCursor)
# sql = "select * from behavioraldatasheet;"
# conn=cursor.execute(sql)
# res = cursor.fetchall()
# #
# #
# # print(res)
# # print(res[0]['clssystemname'])
#
#
# i={
#     "specification_name": "学生课堂学习规范",
#     "specification_description": "学生的课堂学习",
#     "data_clssystem": [
#         {
#             "clssystemname": "布鲁姆认知领域分类",
#             "clsname": "知道",
#             "cls_rules_description": "这是对知道的描述...",
#             "data": [
#                 {
#                     "behavioraldatasheetname": "学生课堂互动行为数据表",
#                     "behavioraldataname": "观看视频, 提出问题"
#                 },
#                 {
#                     "behavioraldatasheetname": "教师板书行为数据表",
#                     "behavioraldataname": "浏览资源"
#                 }
#             ]
#         },
#         {
#             "clssystemname": "加涅学习结果分类",
#             "clsname": "综合",
#             "cls_rules_description": "这是对综合的描述...",
#             "data": [
#                 {
#                     "behavioraldatasheetname": "学生课堂互动行为数据表",
#                     "behavioraldataname": "制作作品"
#                 }
#             ]
#         }
#     ]
# }
#
#
# print(i['data_clssystem'][0])
#
import re

behavioraldatasheetname = '教师&知识/技能>载体-校对-内化/技能&输入#输出*&学生'
suffix = re.split(r'[&>|-]', behavioraldatasheetname)
print(suffix)


count = 0
str_list = list(behavioraldatasheetname)
for each_char in str_list:
    count += 1
    if each_char == '&':
        print(each_char, count - 1)
    elif each_char == '-':
        print(each_char, count - 1)
    elif each_char == '>':
        print(each_char, count - 1)
    elif each_char == '|':
        print(each_char, count - 1)




#
# # loadapplist = []
# # dataapp = {}
# # loadapplist2=[]
# # for i in res:
# #     # print(i['clssystemname'])
# #     clsname=i['clssystemname']
# #     sql = "select * from %s;"%clsname
# #     cursor.execute(sql)
# #     res2 = cursor.fetchall()
# #     dataapp['clssystemname'] = clsname
# #     dataapp['clsname']=res2
# #     loadapplist.append(dataapp)
# #     dataapp={}
# #     loadapplist2.append(loadapplist)
# #     loadapplist = []
# # print(loadapplist2)
#
# # print(loadapplist)
# # print(clsname)
#     # loadapplist2.append(loadapplist)
#     # dataapp = {}
#
# #     for line in cursor.fetchall():
# #         # print('line:',line)
# #         # aa = {'data': line}
# #         dataapp.update(line)
# #         loadapplist.append(dataapp)
# #         dataapp = {}
# #
# #     dataapp = {}
# #     loadapplist2.append(loadapplist)
# #
# #
# # loadapplist2.append(loadapplist)
# # print('111111111111',loadapplist2)
#
#
#
#
#
# # print('dataapp:', dataapp)
# # print('loadapplist2:', loadapplist2)
#
#
#
# # loadapplist = []
# # dataapp = {}
# #
# # for line in cursor.fetchall():
# #     print(line)
# #     # aa = {'data': line}
# #     dataapp.update(line)
# #     loadapplist.append(dataapp)
# #     dataapp = {}
# # dataapp['clssystemname'] = 'bulumu'
# # loadapplist.append(dataapp)
# # print('dataapp:', dataapp)
# # print('loadapplist:', loadapplist)
